﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="edit.aspx.cs" Inherits="CampanyCMS.WebUI.Admin.TemplatesMgnt.edit" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>NewNews</title>
    <link href="../../css/cssCn.css" type="text/css" rel="stylesheet">
    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script>
        $(document).ready(function() {
           

        });
        //1提交，2草稿，0，不验证。
        function ValidationInput(flag) {
            
                if ($("#txtTemplateName").val() == '') {
                    
                    alert("请输入模板名!");
                    $("#txtTemplateName").focus();
                    return false;
                }
                if ($("#txtTemplateFolder").val() == '') {
                    alert("请输入模板路径!");
                    $("#txtTemplateFolder").focus();
                    return false;
                }
                if ($("#FileUpload1").val() == '' && $('#lblImg').html() == '') {
                    alert("请选择模板图!");
                    $("#FileUpload1").focus();
                    return false;
                }                
             
        }
    </script>

</head>
<body ms_positioning="GridLayout">
    <form id="Form1" method="post" runat="server">
    <table id="tb_content" cellspacing="0" cellpadding="0" align="center">
        <tbody>
            <tr>
                <td>
                   
                    <table id="tb_content" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <table class="tb_input" id="queryPane" cellspacing="1" cellpadding="0" width="100%"
                                    align="center" bgcolor="#ffffff" border="0">
                                    <tr>
                                        <td colspan="2" class="td_head">
                                            模板内容 
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_title" width="15%">
                                            模板名*
                                        </td>
                                        <td>
                                            
                                                <asp:TextBox ID="txtTemplateName" runat="server" Width="250"></asp:TextBox> 
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_title" width="15%">
                                            模板图
                                        </td>
                                        <td>
                                            <asp:FileUpload ID="FileUpload1" runat="server" />                                            
                                            <asp:Label ID="lblImg" runat="server"  Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_title" width="15%">
                                            限制等级
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtLimitLevel" runat="server" Text="1" />
                                        </td>
                                    </tr>
                                                                         
                                    <tr>
                                        <td class="td_title" width="15%">
                                            模板路径
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtTemplateFolder" runat="server" Width="250"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_title" width="15%">
                                            描述
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtDesc" runat="server" Width="80%" TextMode="MultiLine" Rows="3"></asp:TextBox>
                                        </td>
                                    </tr>
                                    
                                </table>
                                <table width="100%">
                                    <tr>
                                        <td align="right" width="100%">
                                            <asp:Button ID="btnSave" runat="server" CssClass="button" Text="保存" OnClientClick="return ValidationInput(1)"
                                                OnClick="btnSave_Click"></asp:Button><asp:Button ID="btnReturn"  
                                                    runat="server" CssClass="button" Text="返回" OnClick="btnReturn_Click"></asp:Button>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
</body>
</html>
